/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.ejb.sessionbean;

import cassys.dataaccess.DAOException;
import cassys.dataaccess.DAOFactory;
import cassys.dataaccess.EvaluationDAO;
import cassys.datatransferobjects.EvaluationDTO;
import cassys.datatransferobjects.EvaluationItemDTO;
import java.util.ArrayList;
import javax.ejb.Stateless;
import javax.ejb.LocalBean;

/**
 *
 * @author Priyanka
 */
@Stateless(mappedName="EvaluationBean")

public class EvaluationBean implements EvaluationBeanRemote{

    public EvaluationDAO dao=null;
    
    public void ejbCreate() {
       dao = DAOFactory.getInstance().getEvaluationDAO();
    }
      
     public void insertEvaluation(EvaluationDTO dto)  throws DAOException
     {
         dao.insertEvaluation(dto);
     }

    @Override
    public EvaluationDTO findEvalByAssess(String assessmentId) throws DAOException {
        return dao.findEvaluationByAssess(assessmentId);
    }

    @Override
    public ArrayList<EvaluationDTO> findAllEvaluations() throws DAOException {
        return dao.findAllEvaluation();
    }
}
